package com.ysstech.valuation.feign;


import com.ysstech.common.entity.TreeNode;
import com.ysstech.valuation.feign.entity.Balance;
import com.ysstech.valuation.feign.entity.Subject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;


/**
 * 获取财务模块的数据
 */
@FeignClient(name = "yss-finance", fallback = FeignFinanceServiceFallback.class)
public interface FeignFinanceService {
    /**
     * 获取产品信息数据
     *
     * @param orgId
     * @return
     */
    @RequestMapping(value = "/financeAccount/queryAccountTreeByType", method = RequestMethod.POST)
    List<TreeNode> queryAccountTreeByType(@RequestParam("orgId") String orgId, @RequestParam("fundType") Integer fundType
            , @RequestParam("fype") Integer fype);

    /**
     * 获取科目信息
     *
     * @return
     */
    @RequestMapping(value = "/subject/getSubjectMap", method = RequestMethod.POST)
    Map<String, Subject> getSubjectMap();


    /**
     * 获取余额表数据
     *
     * @return
     */
    @RequestMapping(value = "/balance/queryBalanceByValuation", method = RequestMethod.POST)
    List<Balance> queryBalanceByValuation(@RequestParam("accountId") String accountId, @RequestParam("fdate") String fdate);
}
